{url [index.php]}
{url [page-<page=1>]}
{layout "@layout.latte"}

{block #content}
{default $page = 1}

{foreach $context->database->table('article')->order('created')->page($page, 5) as $article}
	<div class="article">
		<div class="date">{$article->created|date:'F j, Y'}</div>

		<h1><a href="article/{$article->id}">{$article->title}</a></h1>

		{!$article->content}
	</div>
{/foreach}

<p><a href="page-{$page-1}" n:if="$page > 1">← back</a>
	&nbsp;
<a href="page-{$page+1}" n:if="$iterations">next →</a></p>
